package com.binc.testspring.study.nio.netty.groupChat;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * FileName: Netty_group_chat_client_childChannel
 * Autho: binC
 * Date:  2022/4/20 16:23
 */
public class Netty_group_chat_client_childChannel extends SimpleChannelInboundHandler<String> {

    /**
        读取客户端发送的数据,转发给在线的其他客户端
     */
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {
        //获取到当前的channel
        //Channel channel = ctx.channel();

        System.out.println(msg);
    }


}
